www.gusucode.com > wxApp PHP版微信小程序CMS系统 v1.0PHP源码程序 > wxApp PHP版微信小程序CMS系统 v1.0/wxAppCMS_v1.0.0/wxAppCMS_v1.0.0/iPHP/core/template/plugins/block.strip.php
<?php /** * template_lite {strip}{/strip} block plugin * * Type: block function * Name: strip * Purpose: strip unwanted white space from text * Credit: Taken from the original Smarty * http://smarty.php.net */ function tpl_block_strip($params, &$content, &$tpl){ $_strip_search = array( "![\t ]+$|^[\t ]+!m", // remove leading/trailing space chars '%[\r\n]+%m', // remove CRs and newlines ); $_strip_replace = array( '', '', ); $content = preg_replace($_strip_search, $_strip_replace, $content); return true; }